#ifndef __EVENT_INTERNAL_H
#define __EVENT_INTERNAL_H

#include "base-structure/linux-list.h"

struct event_base;

struct eventop {
    void* (*init)      (struct event_base *);
    int  (*dealloc)   (void *, struct event_base *);
    void  (*dispatch)  (void *, struct event_base *);
    int   (*add)       (void *, struct event *);
    int   (*del)       (void *, struct event *);
};

struct event_base {
    const struct eventop *evsel;
    void *evbase;

    struct list_head active_head;
};

extern void event_active(struct event *ev, int res);

#endif
